<!DOCTYPE html>
<html lang="en" style="height:100%;">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>提现详情</title>

    <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/yzl.css"/>

    <style>
        .withdraw_detail-row {
            overflow: hidden;
            margin-top: 30px;
            padding: 0 20px;
        }

        .withdraw_detail-row > span:first-child {
            float: left;
            color: #aaa;
        }

        .withdraw_detail-row > span:last-child {
            float: right;
        }
    </style>

</head>
<body style="height:100%;background-color:white;">
<div id="blank" class="header" v-cloak>
    <div v-back.tapmode class="back"></div>
    <span class="title">提现详情</span>
</div>
<div id="app" class="top-container" v-cloak>
    <div class="withdraw_detail-row">
        <span>提现金额</span>
        <span>¥{{detail.price}}元</span>
    </div>
    <div class="withdraw_detail-row">
        <span>提现方式</span>
        <span>{{type}}提现</span>
    </div>
    <div class="withdraw_detail-row">
        <span>提现时间</span>
        <span>{{detail.date_add | time}}</span>
    </div>
    <div class="withdraw_detail-row">
        <span>提现状态</span>
        <span style="color:#eb6823">{{state}}</span>
    </div>
</div>
</body>
<script src="../../script/api.js"></script>
<script src="../../script/vue.js"></script>
<script src="../../script/app.js"></script>
<script>
    var detail;
    apiready = function () {
        setBSImg();
        new Vue({
            el: '#blank'
        })
        detail = api.pageParam;
        initApp();
        api.parseTapmode();
        addListeners();
    };

    function initApp() {
        new Vue({
            el: '#app',
            data:{
                detail:detail
            },
            computed:{
                type: function () {
                    switch (this.detail.type) {
                        case '1':
                            return '支付宝';
                        case '2':
                            return '银行卡';
                    }
                },
                state: function () {
                    switch (this.detail.state) {
                        case '1':
                            return '申请中';
                        case '2':
                            return '已通过';
                        case '3':
                            return '未通过';

                    }
                }
            }
        })
    }

    function addListeners() {
        api.addEventListener({
            name: 'viewappear'
        }, function () {
            onPageStart();
        });

        api.addEventListener({
            name: 'viewdisappear'
        }, function (ret, err) {
            onPageEnd();
        });

        api.addEventListener({
            name: 'keyback'
        }, function (ret, err) {
            onPageEnd();
            api.closeWin();
        });
    }

</script>
</html>